This invention relates to a coding apparatus that efficiently encodes picture data to digital signals with less code amounts by motion compensation to effectively transmit, store and display pictures and a decoding apparatus for decoding the picture data.
There is a prediction method in moving picture efficient coding that displaces, prior to prediction, portions of a picture per block in accordance with the motion of the picture in inter-picture prediction.
This picture spatial displacement is called motion compensation and has widely been employed in international standard system, such as MPEG.
When the motion compensation is applied in the inter-picture prediction, picture motion information (motion vector) is also coded. Because motion compensation the same as that in coding must be done in decoding.
FIG. 1 shows a block diagram of a conventional coding apparatus with motion compensation.
In FIG. 1, an image (picture) signal is supplied to a subtracter 2 via input terminal 1. The subtracter 2 subtracts an inter-picture predictive signal from the input image signal. The inter-picture predictive signal is supplied by a motion compensated predictor 6. The subtracter 2 then generates an inter-picture predictive residue signal that is supplied to a discrete cosine transformer (DCT) 3.
The discrete cosine transformer 3 processes the inter-picture predictive residue signal by discrete cosine transforming per 8.times.8 pels to generate coefficients that are supplied to a quantizer 4. The quantizer 4 quantizes the coefficients by a predetermined quantization step width to generate fixed-length coded coefficients. The fixed-length coded coefficients are supplied to an arrangement converter 5.
The arrangement converter 5 rearranges two-dimensional 8.times.8 coefficients in one-dimension in Zigzag scanning order. The coefficients rearranged in one-dimension are supplied to a variable-length encoder 10.
The variable-length encoder 10 encodes a run length of zeros and other values of the coefficients by Huffman coding to generate a bitstream.
The bitstream of the inter-picture predictive residue is multiplexed by a multiplexer 15 with a bitstream of motion vectors and output via output terminal 16.
The fixed-length coded coefficients are also supplied to a dequantizer 9 and then to an inverse-discrete cosine transformer (IDCT) 8. The dequantizer 9 and the inverse-discrete cosine transformer 8 perform the reverse processing of the quantizer 4 and the discrete cosine transformer 3, respectively, to reproduce the inter-picture predictive residue signal that is supplied to an adder 7.
The adder 7 adds the inter-picture predictive residue signal and the inter-picture predictive signal to reproduce the image signal that is supplied to the motion compensated predictor 6.
The motion compensated predictor 6 stores one frame picture and displaces the picture per block in accordance with the motion vectors supplied from a motion estimator 12 to generate a motion-compensated inter-picture predictive signal. The inter-picture predictive signal is supplied to the subtracter 2 and the adder 7.
The motion vectors are obtained per block from the input image signal by the motion estimator 12. Each block is composed of the array in the range of (8.times.8) and (16.times.16) pels. The motion vectors thus obtained are also supplied to a predictive subtracter 13.
The predictive subtracter 13 compares vector values of an already coded block and a block to be coded per "x" and "y" components to generate residue values that are supplied to a variable-length encoder 14.
The variable-length encoder 14 encodes the residue values by Huffman coding to generate a bitstream.
The generated bitstream is multiplexed with the bitstream of the inter-picture predictive residue signal by the multiplexer 15 as described above.
FIG. 2 shows a block diagram of a conventional decoding apparatus with motion compensation.
The coded signal output from the coding apparatus of FIG. 1 is supplied to a demultiplexer 18 via input terminal 17 to be divided into the bitstreams of the inter-picture predictive residue signal and the motion vectors.
The bitstream of the inter-picture predictive residue signal is decoded by a variable-length decoder 19 to be the fixed-length codes.
The fixed-length codes are supplied to a reverse arrangement converter 20 that performs the reverse processing of the arrangement converter 5 of FIG. 1 to obtain (8.times.8) array of coefficients.
The coefficients are supplied to a dequantizer 21 and then to an inverse-discrete cosine transformer (IDCT) 22 to reproduce the inter-picture predictive residue signal.
The inter-picture predictive residue signal is supplied to an adder 23 and added to an inter-picture predictive signal to reproduce the image signal.
The reproduced image signal is output via output terminal 24 and supplied to a motion compensated predictor 27.
The motion compensated predictor 27 generates the inter-picture predictive signal in accordance with the motion vectors supplied from a predictive adder 26.
The bitstream of the motion vectors divided by the demultiplexer 18 is supplied to a variable-length decoder 25 that performs the reverse processing of the variable-length encoder 14 of FIG. 1 to obtain the residue values of the motion vectors.
The residue values are supplied to the predictive adder 26 where vector values of an already decoded block are added to the residue values to obtain motion vectors. The motion vectors are supplied to the motion compensated predictor 27 as described above.
The conventional coding apparatus described above has the following drawbacks:
Since motion vectors do not involve change, a code is generated per motion vector even if a residue value is zero. Further, when motion vectors gradually change in a zoomed scene, many codes are generated even if the change is monotonous.
Therefore, the conventional coding apparatus cannot compress the generated code amount effectively. Further, the conventional coding apparatus must be provided with motion compensation circuitry because the motion compensation is executed by a method completely different from that of inter-picture predictive residue coding.